<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="EN-US">
<HEAD>
<TITLE>VT100.net: VT330/VT340 Programmer Reference Manual</TITLE>
<LINK HREF="vt330.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<DIV CLASS="navbar"><A HREF="http://vt100.net/"><IMG CLASS="button" SRC="vt100.net-logo.png" ALT="VT100.net" HEIGHT="16" WIDTH="102"></A> VT330/VT340 Programmer Reference Manual Volume 2: Graphics Programming<TABLE WIDTH="100%">
<COL SPAN="3" WIDTH="33%">
<TBODY>
<TR>
<TD ALIGN="LEFT"><A HREF="about.html">About</A></TD>
<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT"><A HREF="chapter2.html">Chapter 2</A></TD>
</TR>
</TBODY>
</TABLE>
<HR></DIV>
<H1 ID="S1"><SPAN CLASS="chapnum">1</SPAN> Introduction to ReGIS</H1>
<H2 ID="S1.1">What is ReGIS?</H2>
<P><DFN>ReGIS</DFN> is a graphics instruction set from Digital. This chapter describes how to
use ReGIS with the VT300. You can use ReGIS to create graphics for display
or printing.</P>
<P>ReGIS is a symbol system describing the parts of an image. You build an image
by combining standard geometric forms: dots, lines, curves, circles, and
arcs. You can also define text characters and add shading to your images.</P>
<P>ReGIS lets you describe each geometric form with a few command characters.
For example, ReGIS lets you draw a circle of any size, at any point on the
screen. You simple specify (1) the command to draw the circle, (2) the location of
the center of the circle, and (3) any point on the circumference of the circle.</P>
<P>ReGIS has 10 basic commands (<A HREF="#T1-1">Table 1-1</A>). Each command has several options.
The following chapters describe each command and its options.</P>
<TABLE ID="T1-1" CLASS="majortable">
<CAPTION>Table 1-1 ReGIS Command Summary</CAPTION>
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Command Letter</TH>
<TH>ReGIS Command</TH>
<TH>Description</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>S</TD>
<TD>Screen</TD>
<TD>Provides screen controls, such as erasing the screen.</TD>
</TR>
<TR VALIGN="TOP">
<TD>W</TD>
<TD>Write</TD>
<TD>Provides writing controls, such as writing shades.</TD>
</TR>
<TR VALIGN="TOP">
<TD>P</TD>
<TD>Position</TD>
<TD>Moves the graphics cursor without performing any writing.</TD>
</TR>
<TR VALIGN="TOP">
<TD>V</TD>
<TD>Vector</TD>
<TD>Draws vectors (straight lines) between the screen locations you specify in the command.</TD>
</TR>
<TR VALIGN="TOP">
<TD>C</TD>
<TD>Curve</TD>
<TD>Draws circles and arcs, using the screen locations you specify in the command.</TD>
</TR>
<TR VALIGN="TOP">
<TD>T</TD>
<TD>Text</TD>
<TD>Controls the display of text strings in graphics, and lets you specify characters to display.</TD>
</TR>
<TR VALIGN="TOP">
<TD>L</TD>
<TD>Load</TD>
<TD>Defines and loads alternate characters you can display with the text command.</TD>
</TR>
<TR VALIGN="TOP">
<TD>@</TD>
<TD>Macrograph</TD>
<TD>Defines a command string as a macrograph. You use macrographs to store and recall other ReGIS command strings.</TD>
</TR>
<TR VALIGN="TOP">
<TD>R</TD>
<TD>Report</TD>
<TD>Reports information such as the active position and error codes.</TD>
</TR>
<TR VALIGN="TOP">
<TD>F</TD>
<TD>Polygon Fill</TD>
<TD>Fills in a single closed figure, such as a circle or square.</TD>
</TR>
<TR VALIGN="TOP">
<TD>;</TD>
<TD>Resynchronization</TD>
<TD>Resynchronizes the flow of ReGIS command strings to the beginning of a new command.</TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S1.2">Conventions</H2>
<P>The following conventions apply to the ReGIS commands in this manual.</P>
<UL>
<LI><P>You can use uppercase and lowercase letters with ReGIS commands
(except text in a quoted string). This manual uses uppercase letters
for clarity.</P></LI>
<LI><P>Angle brackets <STRONG>&lt; &gt;</STRONG> indicate that you can select different values.
The &lt;values&gt; in the angle brackets define what type of information
you can use, but the angles are not part of the ReGIS syntax.</P></LI>
<LI><P><STRONG>[X,Y]</STRONG> indicates you can select screen position values. The brackets
are part of the ReGIS command syntax. You can use both values (X and Y) or just
one value (X or Y).</P></LI>
</UL>
<H2 ID="S1.3">ReGIS Command Syntax</H2>
<P>This section describes the format you use for ReGIS commands. The section
also describes the numeric values you can use and the order that ReGIS performs
commands in.</P>
<H3 ID="S1.3.1">Command Key Letter</H3>
<P>ReGIS commands begin with a single character that identifies the command
type, followed by any selected options and arguments for that command. This
character is called a <DFN>command key letter</DFN>. For example, an S indicates a screen
control command.</P>
<P CLASS="example">S &lt;option&gt; &lt;option&gt;</P>
<P>You only have to use one command key letter for a series of arguments, until
you select a new command type. For example, here is a sequence of screen (S)
and position (P) commands.</P>
<P CLASS="example">S &lt;option&gt; &lt;argument&gt; &lt;argument&gt; P &lt;argument&gt; S &lt;argument&gt;</P>
<P>If you use an argument without a command key letter, ReGIS links that argument
to the last identified command.</P>
<H3 ID="S1.3.2">Argument and Option Formats</H3>
<P>An <DFN>argument</DFN> is any variable you include in a command to modify the action of
that command. There are four types of arguments used in ReGIS.</P>
<UL>
<LI><P><DFN>Options and suboptions</DFN><BR>Are always enclosed in parentheses.</P></LI>
<LI><P><DFN>Digit strings</DFN><BR>Define numeric parameters for command and options.</P></LI>
<LI><P><DFN>Bracketed extents</DFN><BR>Define position coordinates, or height and width values for text characters.</P></LI>
<LI><P><DFN>Quoted text strings</DFN><BR>Define text for display or printing.</P></LI>
</UL>
<P>All ReGIS data is enclosed in parentheses, brackets, or quotes, except for the
following.</P>
<UL>
<LI>Command key letters</LI>
<LI>Macrograph command options that are defined by the @ sign as a command's key lettter</LI>
<LI>Pixel vector (PV) offset values</LI>
<LI>Hex values used to define the contents of a character cell</LI>
</UL>
<P>This section describes the meaning of parentheses, brackets, and quotes in
ReGIS commands. The section also describes how commas and spaces affect
commands.</P>
<H4 ID="S1.3.2.1">Parentheses</H4>
<P>You use parentheses to enclose options and suboptions.</P>
<P CLASS="example">Command(Option(Suboption))</P>
<P>The left parenthesis, (, defines the beginning of the option or suboption. The
right parenthesis, ), defines the end. ReGIS assumes that any letter not enclosed
in parentheses or quotes is a command key letter.</P>
<P>You must enclose each suboption in a separate nested set of parentheses.
Otherwise, ReGIS tries to process the suboption as an option. This could cause
errors in your program.</P>
<P>Here are some examples of various ReGIS command with options and suboptions
in parentheses.</P>
<DIV CLASS="example"><TABLE>
<COL WIDTH="25%">
<COL WIDTH="75%">
<THEAD>
<TR>
<TH>Command</TH>
<TH>Meaning of Parentheses</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>S(E)</TD>
<TD><B>E</B> is an erase option to the <B>S</B> screen control command.</TD>
</TR>
<TR VALIGN="TOP">
<TD>W(I0,F3)</TD>
<TD><P><B>I</B> and <B>F</B> are foreground intensity and plane select options
to the <B>W</B> write control command.</P>
<P>The <B>0</B> and <B>3</B> are numeric arguments to the options. A
comma separates the options. You can also use spaces to
separate options. (See the <A HREF="#S1.3.2.4">section on commas and spaces</A>.)</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>P(W(M100))</TD>
<TD><P>This is a pixel vector (PV) multiplication temporary write
option to the <B>P</B> position command.</P>
<P>The <B>W</B> write command is used as an option.</P>
<P>The <B>M</B> multiplication option of the write control command
is used as a suboption.</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>V(W(I(R)))</TD>
<TD><P>This example defines a temporary write option affecting
the value of the foreground intensity for a vector command.</P>
<P>The <B>W</B> write command is used as an option.</P>
<P>The <B>I</B> foreground intensity option to the write control command
is used as a suboption.</P>
<P>The <B>R</B> argument to the I suboption is enclosed in a third set of parentheses,
since this argument is a letter value.</P></TD>
</TR>
</TBODY>
</TABLE></DIV>
<P>As these examples show, you must use an equal number of opening and closing
parentheses. For example, take the command</P>
<P CLASS="example">V(W(I(R)))</P>
<P>The outer set of parentheses define the W option. The second set of parentheses
define the I suboption. The inner set of parentheses define the R sub-suboption.</P>
<H4 ID="S1.3.2.2">Brackets</H4>
<P>You use brackets to enclose two types of numeric values.</P>
<UL>
<LI>Coordinate position values</LI>
<LI>Height and width values</LI>
</UL>
<P>Coordinate position values are arguments to commands, options, and suboptions.
The coordinates can represent a specific point on the screen (known as
an absolute value), some amount of displacement (known as a relative value), or
a combination of the two.</P>
<P>Height and width values are arguments to text commands only. These values
represent relative displacement values for text options.</P>
<P CLASS="note">NOTE: For more information on screen coordinate values, see "<A HREF="#...">Screen
Coordinates</A>" in this chapter.</P>
<H4 ID="S1.3.2.3">Quotes</H4>
<P>You use quotes to enclose any of the following ReGIS elements.</P>
<UL>
<LI>Text to display on the screen (Used with text commands.)</LI>
<LI>A printable character to use for shading</LI>
<LI>A name for a character set selected by a load command</LI>
<LI>A single ASCII character used as a call letter for load cell arguments to a load command</LI>
</UL>
<P>In all cases, you can use double quotes ("), or single quotes ('). The quote mark
is the first character of the argument, so you do not need parentheses. The
first quote mark defines the start of the argument, while the second defines
the end.</P>
<H4 ID="S1.3.2.4">Commas and Spaces</H4>
<P>You can use commas and spaces to separate option
values in ReGIS commands. The commas and spaces make command strings
easier to read.</P>
<P>There are two cases where you must use commas: (1) to separate numeric values
in brackets such as [100,200]; (2) when you have an E command (such as
an erase screen to specified background) that follows a numeric value. ReGIS
can handle exponential values, so you must insert a comma between the numeric
value and the E command letter. This comma prevents ReGIS from assuming
that the numeric value is exponential.</P>
<P>ReGIS does not include commas and spaces as part of a graphic image, unless
you use them in a quoted text string for a text command.</P>
<H3 ID="S1.3.3">Numeric Values</H3>
<P>You send numeric values as decimal integer strings to the VT300. You can use
signed values where appropriate. The VT300 is an integer-oriented device.
However, it accepts floating point specifiers, truncating those values to 16-bit
signed integers for internal use.</P>
<P>The VT300 also accepts exponential values. You define an exponential value by
using the letter E and the power of 10 after a decimal integer string. This
feature lets you run ReGIS commands written in higher level languages (such
as FORTRAN and Pascal) on the VT300.</P>
<H3 ID="S1.3.4">When Does ReGIS Perform Commands?</H3>
<P>ReGIS performs commands and options immediately. ReGIS acts on each option,
suboption, and argument as soon as ReGIS receives the command.</P>
<H2 ID="S1.4">Control Characters</H2>
<P>ReGIS recognizes only four control characters.</P>
<UL>
<LI>CR (carriage return)</LI>
<LI>LF (line feed)</LI>
<LI>BS (backspace)</LI>
<LI>HT (horizontal tab)</LI>
</UL>
<P>You can only use these control characters in a quoted string. Since ReGIS ignores
control characters outside a quoted string, you can use line feeds and
carriage returns to separate command strings. This makes your command
strings easier to read, without affecting the graphic image.</P>
<H2 ID="S1.5">VT300 Screen</H2>
<P>The VT300 screen has 384,000 pixels arranged in 800 vertical columns by 480
horizontal rows. A <DFN>pixel</DFN> (picture element) is the smallest unit the terminal can
display.</P>
<P>ReGIS lets you draw lines, curves, and text by turning on specific pixels on the
screen. For example, when you turn on several pixels in a row, a line appears
on the screen. You can turn any one of the 384,000 individual pixels on or off,
by using an X-Y coordinate system.</P>
<H2 ID="S1.6">X-Y Coordinate System</H2>
<P>You can select any pixel on the screen by specifying its location. You use an
[X,Y] coordinate to specify the location of the pixel. The X-coordinate specifies
the horizontal position value. The Y-coordinate specifies the vertical position
value. The pixel is at the intersection of the X and Y values.</P>
<P><A HREF="#F1-1">Figure 1-1</A> shows a typical coordinate system. The [X,Y] coordinates specify a
point in the coordinate system.</P>
<TABLE ID="F1-1" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 1-1 Typical X-Y Coordinate System</CAPTION>
<COL ALIGN="CENTER">
<TBODY>
<TR>
<TD><IMG SRC="ma-0653-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S1.6.1">Syntax</H3>
<P>ReGIS commands use a specific syntax for X- and Y-coordinates in ReGIS
commands. There are three simple rules for specifying a coordinate position.</P>
<UL>
<LI>Enclose the coordinates in brackets.</LI>
<LI>Specify the X-coordinate (if any) first.</LI>
<LI>Put a comma before any Y-coordinate, even if there is no X-coordinate.</LI>
</UL>
<P>You do not have to specify both an X and Y value in all cases. In fact, you
only have to specify an X or Y value that is changing from the current value.</P>
<P>If you only change the X value, simple specify the new X value in brackets.
ReGIS recognizes [X] as meaning the Y value is unchanged. If you only change
the Y value, use a comma before the new Y value in the brackets. ReGIS recognizes
[,Y] as meaning the X value is unchanged. The comma indicates that
the next coordinate is a Y value.</P>
<P>You specify coordinate values as numeric values assigned to points on the
screen. This method is called display addressing. You can use a default value,
embedded decimal values, or exponential values. See the display addressing option
to the screen command (<A HREF="chapter2.html">Chapter 2</A>).</P>
<P>You can use absolute values (referring to a specific point), relative values (referring
to a point as it relates to the current active position), or a combination of
the two. Here are some examples of coordinate values.</P>
<TABLE>
<COL WIDTH="30%">
<COL WIDTH="70%">
<THEAD>
<TR>
<TH>Coordinate</TH>
<TH>Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>[10,86]</TD>
<TD>Absolute value for X and Y</TD>
</TR>
<TR VALIGN="TOP">
<TD>[52]</TD>
<TD>Absolute value for X, with Y unchanged</TD>
</TR>
<TR VALIGN="TOP">
<TD>[,121]</TD>
<TD>Absolute value for Y, with X unchanged</TD>
</TR>
<TR VALIGN="TOP">
<TD>[+15,-10]</TD>
<TD>Relative values for X and Y</TD>
</TR>
<TR VALIGN="TOP">
<TD>[+10,100]</TD>
<TD>Relative value for X, absolute value for Y</TD>
</TR>
<TR VALIGN="TOP">
<TD>[100,-25]</TD>
<TD>Absolute value for X, relative value for Y</TD>
</TR>
<TR VALIGN="TOP">
<TD>[6.25,10.4]</TD>
<TD>Absolute embedded decimal values for X and Y</TD>
</TR>
<TR VALIGN="TOP">
<TD>[.1E3,1000E-1]</TD>
<TD>Absolute exponential values for X and Y</TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S1.6.2">Screen Coordinates</H3>
<P>The VT300 starts counting [X,Y] coordinates at the upper-left corner of the
screen. The first pixel is at location [0,0], called the <DFN>screen origin</DFN>.</P>
<P>X-coordinates range from 0 (the left edge of the screen), through 799 (the right
edge). Y-coordinates range from 0 (the top of the screen), through 479 (the bottom).
This provides an 800 (0 to 799) by 480 (0 to 479) array of specific screen
locations.</P>
<H2 ID="S1.7">Graphics Cursors</H2>
<P>The VT300 has two types of graphics cursors, an output cursor and input
cursor.</P>
<H3 ID="S1.7.1">Output Cursor</H3>
<P>The output cursor only appears when the terminal is in ReGIS mode and waiting
for ReGIS input from the host. You can select whether or not to display
the output cursor by using the <B>Graphics Cursor</B> feature in the Graphics Set-Up
screen, or by using the ReGIS S(C) command ("<A HREF="chapter2.html#...">Graphics Cursor Control</A>" in
<A HREF="chapter2.html">Chapter 2</A>). You can select the style of the output cursor by using the ReGIS
S(C(H)) command ("<A HREF="chapter2.html#...">Graphics Output Cursor</A>" in <A HREF="chapter2.html">Chapter 2</A>). See the
"<A HREF="#S1.7.4">Cursor Styles</A>" section that follows.</P>
<H3 ID="S1.7.2">Input Cursor</H3>
<P>The input cursor appears when the terminal is in ReGIS graphics input mode.
You can move the input cursor by using the arrow keys on the keyboard, or by
using a locator device such as a mouse. You can select the style of input
cursor by using the ReGIS S(C(I)) command ("<A HREF="chapter2.html#...">Graphics Input Cursor</A>" in
<A HREF="chapter2.html">Chapter 2</A>).</P>
<H3 ID="S1.7.3">Cursor Position</H3>
<P>The graphics cursor (input or output) indicates the active screen location. This
location is either the screen origin [0,0] or the point most recently moved or
drawn to.</P>
<P>The graphics cursor is at the screen origin when you enter ReGIS mode after a
power-up or reset condition. If you exit ReGIS, then enter ReGIS again, the
cursor is at the last position drawn or moved to during the previous ReGIS
activity.</P>
<H3 ID="S1.7.4">Cursor Styles</H3>
<P>There are four built-in graphics cursor styles you can use with ReGIS. You can
also define your own input cursor. You select a built-in cursor style by using an
index number with the ReGIS screen command. See "<A HREF="chapter2.html#...">Graphics Cursor
Control</A>" in <A HREF="chapter2.html">Chapter 2</A>.</P>
<H4 ID="S1.7.4.1">Diamond</H4>
<P>This cursor is a 21 &times; 21 pixel diamond. You can use this cursor
for input and output operations. The diamond is the default output cursor.</P>
<H4 ID="S1.7.4.2">Crosshair</H4>
<P>This cursor is a horizontal and a vertical line. The horizontal line
is the width of the screen, and the vertical line is the height of the screen. The
two lines intersect at the active position. You can use this cursor for input and
output operations. The crosshair is the default input cursor.</P>
<H4 ID="S1.7.4.3">Rubber Band Line</H4>
<P>This cursor is a single line, with its origin fixed at the
current drawing (output) position and its endpoint at the current cursor position.
You can only use this cursor as an input cursor.</P>
<H4 ID="S1.7.4.4">Rubber Band Rectangle</H4>
<P>This cursor is a rectangle, with one corner fixed at
the current drawing (output) position and the opposite corner at the current
cursor position. You can only use this cursor as an input cursor.</P>
<H4 ID="S1.7.4.5">User-Defined</H4>
<P>You can define your own input cursor by using the cursor option
to the screen control command (<A HREF="chapter2.html">Chapter 2</A>).</P>
<H2 ID="S1.8">Entering and Exiting ReGIS</H2>
<P>You use device control strings to enter and exit ReGIS.</P>
<TABLE>
<COL SPAN="2" WIDTH="25%">
<COL WIDTH="50%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>8-Bit Device Control String</TH>
<TH>7-Bit Equivalent Escape Sequence</TH>
<TH>Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>DCS p or<BR>DCS 0p</TD>
<TD>ESC Pp or<BR> ESC P0p</TD>
<TD>Enters ReGIS at the point where ReGIS was last exited. Does not display commands.</TD>
</TR>
<TR VALIGN="TOP">
<TD>DCS 1p</TD>
<TD>ESC P1p</TD>
<TD>Enters ReGIS at the command level. ReGIS begins at a new command.</TD>
</TR>
<TR VALIGN="TOP">
<TD>DCS 2p</TD>
<TD>ESC P2p</TD>
<TD>Enters ReGIS at the point where ReGIS was last exited. Displays commands on the screen's bottom line (command display mode).</TD>
</TR>
<TR VALIGN="TOP">
<TD>DCS 3p</TD>
<TD>ESC P3p</TD>
<TD>Enters ReGIS at the command level. ReGIS begins at a new command. Displays commands on the screen's bottom line (command display mode).</TD>
</TR>
<TR VALIGN="TOP">
<TD>ST</TD>
<TD>ESC \</TD>
<TD>Exits ReGIS mode.</TD>
</TR>
</TBODY>
</TABLE>
<P CLASS="note">NOTE: You can enter ReGIS from VT100 or VT300 mode.</P>
<P>You can display ReGIS commands by entering ReGIS with a DCS 2p or DCS
3p sequence. In command display mode, the terminal displays ReGIS commands
as they are performed. The last line of ReGIS commands received appears
on the bottom line of the screen.</P>
<P>In command display mode, the VT300 processes characters as follows.</P>
<UL>
<LI>A line feed character makes the terminal erase the ReGIS command
display line, along with any graphic image previously drawn there.</LI>
<LI>The terminal interprets each character as part of a ReGIS command
and performs the command. Depending on the command, the
graphic image changes.</LI>
<LI>Command characters appear as normal intensity, nonblinking text
(not reverse video).</LI>
</UL>
<P>This processing continues until you leave ReGIS mode with an escape
sequence.</P>
<P><STRONG>Notes on ReGIS Command Display Mode</STRONG></P>
<UL>
<LI><P>Characters appear as the terminal receives them (no case conversion,
syntax checking, or macrograph expansion).</P></LI>
<LI><P>The terminal does not display characters that are not part of the
ReGIS character set (8-bit characters and control characters).</P></LI>
<LI><P>The appearance of the characters is based only on the output map
settings and the image that the characters are drawn over. Other
ReGIS-settable states have no effect.</P></LI>
<LI><P>You can display up to 80 characters on the command line. If the
terminal receives more than 80 characters without a line feed character,
the terminal erases the text line before displaying the next
character.</P></LI>
<LI><P>Command display mode slows down performance, because the system
must process the command characters for display.</P></LI>
</UL>
<H2 ID="S1.9">ReGIS Default Values</H2>
<P>Several ReGIS command arguments have default values. ReGIS always uses
these values after you power up or reset the terminal. The default values let
the terminal draw graphic images as soon as you enter ReGIS mode. You can
change these values in ReGIS. The new values remain in effect until you
change them, or until you power up or reset the terminal again.</P>
<P><A HREF="#T1-2">Table 1-2</A> lists the default values for ReGIS commands.</P>
<TABLE ID="T1-2" CLASS="majortable">
<CAPTION>Table 1-2 ReGIS Power-Up/Reset Default Values Summary</CAPTION>
<COL WIDTH="20%">
<COL SPAN="2" WIDTH="40%">
<THEAD>
<TR>
<TH>Type</TH>
<TH>Default Command</TH>
<TH>Default Setting</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TH COLSPAN="3">Screen Controls</TH>
</TR>
<TR VALIGN="TOP">
<TD>Screen coordinates</TD>
<TD>S(A[0,0][799,479])</TD>
<TD>Upper-left corner is [0,0]. Lower-right corner is [799,479].</TD>
</TR>
<TR VALIGN="TOP">
<TD>Scrolling</TD>
<TD>S[0,0]</TD>
<TD>No scrolling.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Printing offset</TD>
<TD>S(H(P[50,0]))</TD>
<TD>Any printing from the screen is offset 50 coordinates at the printer, to approximate
centering on 8&frac12; inch wide paper.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Monochrome output mapping</TD>
<TD>S(M0(L0) 1(L33) 2(L67) 3(L100))</TD>
<TD>VT330 output map values
<TABLE>
<TBODY>
<TR>
<TD>M0</TD>
<TD>black</TD>
<TD>M2</TD>
<TD>light gray</TD>
</TR>
<TR>
<TD>M1</TD>
<TD>dim gray</TD>
<TD>M3</TD>
<TD>white</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR VALIGN="TOP">
<TD></TD>
<TD>S(M0(L0) 1(L4) 2(L10) 3(L17) 4(L24) 5(L30) 6(L37) 7(L44) 8(L50) 9(L57)
10(L64) 11(L70) 12(L77) 13(L84) 14(L90) 15(L97))</TD>
<TD>VT340 output map values
<TABLE>
<TBODY>
<TR>
<TD>M0</TD>
<TD>black</TD>
<TD>M8</TD>
<TD>black</TD>
</TR>
<TR>
<TD>M1</TD>
<TD>gray-2</TD>
<TD>M9</TD>
<TD>gray-2</TD>
</TR>
<TR>
<TD>M2</TD>
<TD>gray-4</TD>
<TD>M10</TD>
<TD>gray-4</TD>
</TR>
<TR>
<TD>M3</TD>
<TD>gray-6</TD>
<TD>M11</TD>
<TD>gray-6</TD>
</TR>
<TR>
<TD>M4</TD>
<TD>gray-1</TD>
<TD>M12</TD>
<TD>gray-1</TD>
</TR>
<TR>
<TD>M5</TD>
<TD>gray-3</TD>
<TD>M13</TD>
<TD>gray-3</TD>
</TR>
<TR>
<TD>M6</TD>
<TD>gray-5</TD>
<TD>M14</TD>
<TD>gray-5</TD>
</TR>
<TR>
<TD>M7</TD>
<TD>white</TD>
<TD>M15</TD>
<TD>white</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Color output mapping</TD>
<TD>S(M0(AD) 1(AB) 2(AR) 3(AG) 4(AM) 5(AC) 6(AY) 7(AW)
8(AD) 9(AB) 10(AR) 11(AG) 12(AM) 13(AC) 14(AY) 15(AW))</TD>
<TD>VT340 output map values
<TABLE>
<TBODY>
<TR>
<TD>M0</TD>
<TD>black</TD>
<TD>M8</TD>
<TD>gray 25%</TD>
</TR>
<TR>
<TD>M1</TD>
<TD>blue</TD>
<TD>M9</TD>
<TD>blue</TD>
</TR>
<TR>
<TD>M2</TD>
<TD>red</TD>
<TD>M10</TD>
<TD>red</TD>
</TR>
<TR>
<TD>M3</TD>
<TD>green</TD>
<TD>M11</TD>
<TD>green</TD>
</TR>
<TR>
<TD>M4</TD>
<TD>magenta</TD>
<TD>M12</TD>
<TD>magenta</TD>
</TR>
<TR>
<TD>M5</TD>
<TD>cyan</TD>
<TD>M13</TD>
<TD>cyan</TD>
</TR>
<TR>
<TD>M6</TD>
<TD>yellow</TD>
<TD>M14</TD>
<TD>yellow</TD>
</TR>
<TR>
<TD>M7</TD>
<TD>gray 50%</TD>
<TD>M15</TD>
<TD>gray 75%</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Background intensity</TD>
<TD>S(I0)</TD>
<TD>Output map location M0 is used for background. The default value for M0 is black (VT330 and VT340).</TD>
</TR>
<TR VALIGN="TOP">
<TH COLSPAN="3">Write Controls</TH>
</TR>
<TR VALIGN="TOP">
<TD>Pixel vector multiplier</TD>
<TD>W(M1)</TD>
<TD>PV multiplication factor = 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Writing pattern</TD>
<TD>W(P1)</TD>
<TD>Solid line.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Pattern multiplier</TD>
<TD>W(P(M2))</TD>
<TD>Multiplication factor = 2.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Negative pattern</TD>
<TD>W(N0)</TD>
<TD>Disabled.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Bitmap planes</TD>
<TD>VT330: W(F3)<BR>VT340: W(F15)</TD>
<TD>Writing enabled to all bitmap planes.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Foreground intensity</TD>
<TD>VT330: W(I3)<BR>VT340: W(I7)</TD>
<TD>VT330: output map location M3.<BR>VT340: output map location M7.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Overlay writing</TD>
<TD>W(V)</TD>
<TD>On.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Shading</TD>
<TD>W(S0)</TD>
<TD>Off.</TD>
</TR>
<TR VALIGN="TOP">
<TH COLSPAN="3">Text</TH>
</TR>
<TR VALIGN="TOP">
<TD>Character set</TD>
<TD>T(A0)</TD>
<TD>ISO Latin Alphabet Nr 1 character set.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Character cell</TD>
<TD>T(S1)</TD>
<TD>Standard character cell size 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Display cell</TD>
<TD>T(S[9,20])</TD>
<TD>Display cell size associated with standard character cell size 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Unit cell</TD>
<TD>T(U[8,20])</TD>
<TD>Unit cell size associated with standard character cell size 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Character positioning</TD>
<TD>T[+9,+0]</TD>
<TD>Character positioning associated with standard character cell size 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Height multiplier</TD>
<TD>T(H2)</TD>
<TD>Multiplication factor = 2.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Tilt</TD>
<TD>T(D0 S1 D0)</TD>
<TD>String and character tilt off.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Italics</TD>
<TD>T(I0)</TD>
<TD>Off.</TD>
</TR>
<TR VALIGN="TOP">
<TD>Size multiplier</TD>
<TD>T(M[1,2])</TD>
<TD>Multiplication factor of 1 for width and 2 for height.</TD>
</TR>
<TR VALIGN="TOP">
<TH COLSPAN="3">Load</TH>
</TR>
<TR VALIGN="TOP">
<TD>Character set</TD>
<TD>L(A1)</TD>
<TD>Character set 1 selected for loading.</TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S1.10">Preventing Transmission Errors</H2>
<P>When transmission errors occur, the terminal may lose some data for ReGIS
text and commands. These errors can change the meaning of command strings.
You can reduce the effect of some transmission errors by resynchronizing the
flow of data between the host and terminal.</P>
<H3 ID="S1.10.1">Resynchronization Command (;)</H3>
<P>ReGIS recognizes a semicolon (;) as a command to resynchronize. If you think
errors are occurring in your program, you can use the semicolon between command
strings. The semicolon ensures that the previous command string is correctly
closed, even if the closing character (a bracket or parenthesis) is lost in
transmission.</P>
<P>The semicolon cannot fix a garbled message, but may reduce the effect of a
single transmission error.</P>
<P>The terminal does not recognize the semicolon as a resynchronization character
in two cases.</P>
<UL>
<LI>in a quoted text string</LI>
<LI>as part of a macrograph definition</LI>
</UL>
<H2 ID="S1.11">Pixel Vector (PV) System</H2>
<P>You can control the direction of many ReGIS drawing or movement commands
by using the pixel vector (PV) system. You can select eight different directions
with PV numbers (<A HREF="#F1-2">Figure 1-2</A>). Each direction is at a different 45-degree interval.
Each direction has a specific number assigned.</P>
<P>The PV system also lets you specify how far to move in one direction. Each PV
number tells the terminal to move one coordinate in that direction.</P>
<P>To move horizontally or vertically, you use one PV number for each pixel. For
example, you use a PV string of 444 to move three pixels to the left. You use
a 000 string to move three pixels to the right.</P>
<P>If you want to move several coordinates, you can use a pixel vector multiplier.
The next section describes PV multiplication.</P>
<P><A HREF="#F1-3">Figure 1-3</A> shows some examples that use PV numbers. The PV numbers used
show the simplest method of movement. You could use combinations of different
PV values to achieve the same effects.</P>
<TABLE ID="F1-2" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 1-2 Pixel Vector Dimensions</CAPTION>
<COL ALIGN="CENTER">
<TBODY>
<TR>
<TD><IMG SRC="ma-0655-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F1-3" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 1-3 Pixel Vector Examples</CAPTION>
<COL ALIGN="CENTER">
<TBODY>
<TR>
<TD><IMG SRC="ma-0411-86.png" ALT=""></TD>
</TR>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<COL ALIGN="RIGHT">
<COL ALIGN="LEFT">
<TBODY>
<TR>
<TD COLSPAN="2" ALIGN="CENTER">PV VALUES</TD>
</TR>
</TBODY>
<TBODY>
<TR>
<TD>A.</TD>
<TD>MOVEMENT FROM CENTER BY SIX 2s AND THREE 4s</TD>
</TR>
<TR>
<TD>B.</TD>
<TD>MOVEMENT FROM CENTER BY TWO 2s AND FIVE 4s</TD>
</TR>
<TR>
<TD>C.</TD>
<TD>MOVEMENT FROM CENTER BY THREE 6s</TD>
</TR>
<TR>
<TD>D.</TD>
<TD>MOVEMENT FROM CENTER BY SIX 6s AND TWO 0s</TD>
</TR>
<TR>
<TD>E.</TD>
<TD>MOVEMENT FROM CENTER BY FIVE 1s</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S1.11.1">PV Multiplication</H3>
<P>In some PV applications, entering all the PV numbers required would be tedious.
In such cases, you can use a PV multiplier command to simplify the
task.</P>
<P>The PV multiplier command lets you specify the number of times to repeat
each PV number. For example, suppose you use a multiplier of 10. Then each
PV number in later commands specifies movement for 10 coordinates, not just 1.</P>
<P><A HREF="#F1-4">Figure 1-4</A> shows a graphic image drawn using PV multiplication. In this figure,
a write command (defined by W) first sets a PV multiplier of 100 (defined by
M100). Then vector commands (defined by V) draw the image. Each PV value
in the vector commands is multiplied by 100.</P>
<DIV CLASS="centrefig"><TABLE ID="F1-4" CLASS="figure" WIDTH="480">
<CAPTION>Figure 1-4 PV Multiplication Example</CAPTION>
<COL ALIGN="CENTER">
<TBODY>
<TR>
<TD><IMG SRC="ma-0657-83r.png" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>
The active position at the start is (400,100).<BR>
The active position at the end is (400,400).<BR>&nbsp;</SMALL></TD>
</TR>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR>
<TD>W(M100)<BR>
V642446064600206</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></DIV>
<H2 ID="S1.12">ReGIS Examples in this Manual</H2>
<P>The following chapters contain examples of images drawn with ReGIS commands.
For simplicity, most examples are based on the VT330 monochrome
terminal rather than the VT340 color graphics terminal. All the examples
shown also work on the VT340. However, make sure you are aware of the main
differences between the two terminals.</P>
<TABLE>
<COL SPAN="2" WIDTH="50%">
<THEAD>
<TR>
<TH>VT330</TH>
<TH>VT340</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD><UL>
<LI>Monochrome terminal</LI>
<LI>2-plane bitmap</LI>
<LI>Can use up to 4 shades of gray, defined in gray map locations 0 through 3.</LI>
</UL></TD>
<TD><UL>
<LI>Color graphics terminal</LI>
<LI>4-plane bitmap</LI>
<LI>Can use up to 16 colors or shades, defined in color map locations 0 through 15.</LI>
</UL></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S1.12.1">Running the Examples</H3>
<P>As you read about a command, you can draw the examples on your own screen.
Before you run an example, perform these steps.</P>
<OL>
<LI>Press <B>Set-Up</B> to enter set-up. The Set-Up Directory screen appears.</LI>
<LI>Select the <B>Clear Display</B> feature. This will clear the screen after you leave set-up.</LI>
<LI>Select the Global Set-Up screen.</LI>
<LI>Set the <B>On Line/Local</B> feature to "local".</LI>
<LI>Press <B>Set-Up</B> to leave set-up.</LI>
<LI><P>To enter ReGIS mode, hold down the <B>Ctrl</B> key and press <B>3</B>, then
type <B>P2p</B>.</P>
<P><B>Ctrl-3 P2p</B></P>
<P>This sequence tells ReGIS to display the commands you enter. The
commands appear on line 24 at the bottom of the screen.</P></LI>
</OL>
<P>You can now run any of the ReGIS examples in this manual. ReGIS immediately
performs each command you enter, so you can see both the drawing and
the command you entered.</P>
<P>When you finish running examples, perform the following steps to return the
terminal to its normal operating mode.</P>
<OL>
<LI><P>Type the following sequence to exit ReGIS mode.</P>
<P><B>Ctrl-3 \</B></P></LI>
<LI>Enter set-up and set the <B>On Line/Local</B> feature to "on line".</LI>
</OL>
<DIV CLASS="navbar"><HR>
<TABLE WIDTH="100%">
<COL SPAN="3" WIDTH="33%">
<TBODY>
<TR>
<TD ALIGN="LEFT"><A HREF="about.html">About</A></TD>
<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT"><A HREF="chapter2.html">Chapter 2</A></TD>
</TR>
</TBODY>
</TABLE>
<DIV CLASS="navbot">http://vt100.net/docs/vt3xx-gp/chapter1.html</DIV></DIV>
</BODY>
</HTML>
